<?php
/*
 * @Descripttion:
 * @version: v1
 * @Author: youhujun 2900976495@qq.com
 * @Date: 2023-08-22 14:35:41
 * @LastEditors: youhujun 2900976495@qq.com
 * @LastEditTime: 2025-02-05 13:37:32
 * @FilePath: \database\seeders\LaravelFastApi\System\PermissionSeeder.php
 */


//后台带单管理
namespace Database\Seeders\LaravelFastApi\System;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class PermissionSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $this->runOneDeepData();
        $this->runTwoDeepData();
        $this->runThreeDeepData();

    }

	//一级类目
	protected function runOneDeepData()
	{
		 //一级类目
        $oneDeepData = [
            //|--10
            ['created_time'=>time(),'id'=>10,'parent_id'=>0,'deep'=>1,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'/config','component'=>'Layout','name'=>'config','meta_title'=>'系统设置','meta_icon'=>'el-icon-s-tools','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
            //|--20
            ['created_time'=>time(),'id'=>20,'parent_id'=>0,'deep'=>1,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'/businesses','component'=>'Layout','name'=>'businesses','meta_title'=>'业务设置','meta_icon'=>'example','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
            //|--30
            ['created_time'=>time(),'id'=>30,'parent_id'=>0,'deep'=>1,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'/users','component'=>'Layout','name'=>'users','meta_title'=>'用户管理','meta_icon'=>'peoples','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
            //|--40
            ['created_time'=>time(),'id'=>40,'parent_id'=>0,'deep'=>1,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'/article','component'=>'Layout','name'=>'article','meta_title'=>'文章管理','meta_icon'=>'education','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
            //|--50
            ['created_time'=>time(),'id'=>50,'parent_id'=>0,'deep'=>1,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'/picture','component'=>'Layout','name'=>'','meta_title'=>'图片空间','meta_icon'=>'el-icon-picture','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
            //|--60
            ['created_time'=>time(),'id'=>60,'parent_id'=>0,'deep'=>1,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'/log','component'=>'Layout','name'=>'log','meta_title'=>'日志管理','meta_icon'=>'el-icon-notebook-1','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
        ];

		DB::table('permission')->insert($oneDeepData);
	}

	//二级类目
	protected function runTwoDeepData()
	{
		 //二级类目
        $twoDeepData = [

            //|--10 系统设置
			 	//|--|--700
                ['created_time'=>time(),'id'=>700,'parent_id'=>10,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'permission','component'=>'permission','name'=>'Permission','meta_title'=>'菜单管理','meta_icon'=>'tree-table','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--800
                ['created_time'=>time(),'id'=>800,'parent_id'=>10,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'platformConfig','component'=>'platformConfig','name'=>'platformConfig','meta_title'=>'平台配置','meta_icon'=>'international','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
                //|--|--900
                ['created_time'=>time(),'id'=>900,'parent_id'=>10,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'system','component'=>'system','name'=>'system','meta_title'=>'系统配置','meta_icon'=>'component','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
                //|--|--1000
                ['created_time'=>time(),'id'=>1000,'parent_id'=>10,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'role','component'=>'role','name'=>'Role','meta_title'=>'角色管理','meta_icon'=>'el-icon-s-custom','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
				//|--|--1100
                ['created_time'=>time(),'id'=>1100,'parent_id'=>10,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'region','component'=>'region','name'=>'region','meta_title'=>'地区管理','meta_icon'=>'el-icon-location','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
				//|--|--1200
                ['created_time'=>time(),'id'=>1200,'parent_id'=>10,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'bank','component'=>'bank','name'=>'bank','meta_title'=>'银行管理','meta_icon'=>'el-icon-bank-card','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],

            //--20 业务设置
                //|--|--1300
                ['created_time'=>time(),'id'=>1300,'parent_id'=>20,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'common','component'=>'common','name'=>'common','meta_title'=>'通用设置','meta_icon'=>'el-icon-setting','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
				 //|--|--1400
                ['created_time'=>time(),'id'=>1400,'parent_id'=>20,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'group','component'=>'group','name'=>'group','meta_title'=>'分类管理','meta_icon'=>'tree','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
                //|--|--1500
                ['created_time'=>time(),'id'=>1500,'parent_id'=>20,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'level','component'=>'level','name'=>'level','meta_title'=>'级别管理','meta_icon'=>'el-icon-s-data','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
				//|--|--1600
                ['created_time'=>time(),'id'=>1600,'parent_id'=>20,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'servicePlatform','component'=>'servicePlatform','name'=>'servicePlatform','meta_title'=>'业务平台','meta_icon'=>'international','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],

            //|--30 用户管理
                //|--|--1700
                ['created_time'=>time(),'id'=>1700,'parent_id'=>30,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'admin','component'=>'admin','name'=>'userAdmin','meta_title'=>'管理员管理','meta_icon'=>'el-icon-s-custom','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--1800
                ['created_time'=>time(),'id'=>1800,'parent_id'=>30,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'user','component'=>'user','name'=>'user','meta_title'=>'用户管理','meta_icon'=>'el-icon-user','meta_affix'=>0,'alwaysShow'=>1,'hidden'=>0,'meta_noCache'=>0],
				
			//|--50 图片空间
                //|--|--1900
                ['created_time'=>time(),'id'=>1900,'parent_id'=>50,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'album','component'=>'album','name'=>'album','meta_title'=>'我的相册','meta_icon'=>'el-icon-collection','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],	
           
            //|--40 文章管理
                //|--|--2000
                ['created_time'=>time(),'id'=>2000,'parent_id'=>40,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'notice','component'=>'notice','name'=>'notice','meta_title'=>'公告管理','meta_icon'=>'el-icon-postcard','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--2100
                ['created_time'=>time(),'id'=>2100,'parent_id'=>40,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'systemArticle','component'=>'systemArticle','name'=>'systemArticle','meta_title'=>'系统文章','meta_icon'=>'el-icon-document-copy','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
           
            //|--60 日志管理
                //|--|--2200
                ['created_time'=>time(),'id'=>2200,'parent_id'=>60,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'loginLog','component'=>'loginLog','name'=>'LoginLog','meta_title'=>'登录日志','meta_icon'=>'el-icon-notebook-2','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--2300
                ['created_time'=>time(),'id'=>2300,'parent_id'=>60,'deep'=>2,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'eventLog','component'=>'eventLog','name'=>'eventLog','meta_title'=>'事件日志','meta_icon'=>'el-icon-view','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
        ];

		DB::table('permission')->insert($twoDeepData);
	}

	//三级类目
	protected function runThreeDeepData()
	{
		//三级类目
        $threeDeepData = [
			//|--10 系统设置
			//|--|--800 平台配置
                //|--|--|--24000
                ['created_time'=>time(),'id'=>24000,'parent_id'=>800,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'cacheConfig','component'=>'cacheConfig','name'=>'cacheConfig','meta_title'=>'缓存设置','meta_icon'=>'el-icon-picture-outline-round','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],

			//|--|--900 系统配置
                //|--|--|--25000
                ['created_time'=>time(),'id'=>25000,'parent_id'=>900,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'systemConfig','component'=>'systemConfig','name'=>'systemConfig','meta_title'=>'配置参数','meta_icon'=>'component','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--|--26000
                ['created_time'=>time(),'id'=>26000,'parent_id'=>900,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'voiceConfig','component'=>'voiceConfig','name'=>'voiceConfig','meta_title'=>'提示配置','meta_icon'=>'el-icon-bell','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
				//|--|--|--27000
                ['created_time'=>time(),'id'=>27000,'parent_id'=>900,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'otherPaltform','component'=>'otherPaltform','name'=>'otherPaltform','meta_title'=>'三方平台','meta_icon'=>'el-icon-s-operation','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
				//|--|--|--28000
                ['created_time'=>time(),'id'=>28000,'parent_id'=>900,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'wechatPlatform','component'=>'wechatPlatform','name'=>'wechatPlatform','meta_title'=>'微信平台','meta_icon'=>'el-icon-s-operation','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>1,'meta_noCache'=>0],
				//|--|--|--29000
                ['created_time'=>time(),'id'=>29000,'parent_id'=>900,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'douyinPlatform','component'=>'douyinPlatform','name'=>'douyinPlatform','meta_title'=>'抖音平台','meta_icon'=>'el-icon-s-operation','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>1,'meta_noCache'=>0],
			
			//|--|--1300 通用设置
                //|--|--|--30000
                ['created_time'=>time(),'id'=>30000,'parent_id'=>1300,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'gather','component'=>'gather','name'=>'gather','meta_title'=>'集合设置','meta_icon'=>'el-icon-more','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
           
            //|--|--1400 分类管理
                //|--|--|--31000
                ['created_time'=>time(),'id'=>31000,'parent_id'=>1400,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'goodsClass','component'=>'goodsClass','name'=>'goodsClass','meta_title'=>'产品分类','meta_icon'=>'el-icon-present','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--|--32000
                ['created_time'=>time(),'id'=>32000,'parent_id'=>1400,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'category','component'=>'category','name'=>'category','meta_title'=>'文章分类','meta_icon'=>'documentation','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--|--33000
                ['created_time'=>time(),'id'=>33000,'parent_id'=>1400,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'label','component'=>'label','name'=>'label','meta_title'=>'标签管理','meta_icon'=>'el-icon-s-flag','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
				
            //|--|--1500 级别管理
                //|--|--|--34000                      
                ['created_time'=>time(),'id'=>34000,'parent_id'=>1500,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'levelItem','component'=>'levelItem','name'=>'levelItem','meta_title'=>'级别条件','meta_icon'=>'size','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--|--35000
                ['created_time'=>time(),'id'=>35000,'parent_id'=>1500,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'userLevel','component'=>'userLevel','name'=>'userLevel','meta_title'=>'用户级别','meta_icon'=>'peoples','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],

        	//|--|--1600 业务平台
				//|--|--|--36000
                ['created_time'=>time(),'id'=>36000,'parent_id'=>1600,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'phoneIndexBanner','component'=>'phoneIndexBanner','name'=>'phoneIndexBanner','meta_title'=>'首页轮播','meta_icon'=>'el-icon-picture-outline','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],

            //|--|--1800 用户管理
                //|--|--|--37000
                ['created_time'=>time(),'id'=>37000,'parent_id'=>1800,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'userList','component'=>'userList','name'=>'userList','meta_title'=>'用户列表','meta_icon'=>'list','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--|--38000
                ['created_time'=>time(),'id'=>38000,'parent_id'=>1800,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'userCheck','component'=>'userCheck','name'=>'userCheck','meta_title'=>'等待认证','meta_icon'=>'el-icon-s-check','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--|--39000
                ['created_time'=>time(),'id'=>39000,'parent_id'=>1800,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'editUser','component'=>'editUser','name'=>'editUser','meta_title'=>'编辑用户','meta_icon'=>'edit','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>1,'meta_noCache'=>1],

			
            //|--|--2200 登录日志
                //|--|--|--40000
                ['created_time'=>time(),'id'=>40000,'parent_id'=>2200,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'phoneLogin','component'=>'phoneLogin','name'=>'phoneLogin','meta_title'=>'手机登录','meta_icon'=>'el-icon-phone','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--|--41000
                ['created_time'=>time(),'id'=>41000,'parent_id'=>2200,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'adminLogin','component'=>'adminLogin','name'=>'adminLogin','meta_title'=>'后台登录','meta_icon'=>'list','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
            //|--|--2300 事件日志
                //|--|--|--42000
                ['created_time'=>time(),'id'=>42000,'parent_id'=>2300,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'phoneEvent','component'=>'phoneEvent','name'=>'phoneEvent','meta_title'=>'手机事件','meta_icon'=>'el-icon-phone','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
                //|--|--|--43000
                ['created_time'=>time(),'id'=>43000,'parent_id'=>2300,'deep'=>3,'sort'=>100,'is_menu'=>1,'switch'=>1,'path'=>'adminEvent','component'=>'adminEvent','name'=>'adminEvent','meta_title'=>'后台事件','meta_icon'=>'list','meta_affix'=>0,'alwaysShow'=>0,'hidden'=>0,'meta_noCache'=>0],
        ];

		DB::table('permission')->insert($threeDeepData);
	}
}
